<%-- 
    Document   : buy
    Created on : 1.12.2012, 17:11:43
    Author     : Admin
--%>

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>

<s:layout-render name="/newjsp.jsp">
    <s:layout-component name="hlavicka">
        <f:message key="nadpis.home"/>
    </s:layout-component>
    <s:layout-component name="telo">
        <s:useActionBean beanclass="pneuservis.frontend.web.IndexActionBean" var="actionBean"/>
        <b><c:out value="${actionBean.tyre.manufacturer}"/></b>
        <c:out value="${actionBean.tyre.rimSize}R/"/>
        <c:out value="${actionBean.tyre.width}/"/>
        <c:out value="${actionBean.tyre.profile}/"/>
        <c:out value="${actionBean.tyre.season}"/>
        
        <s:form  action="/neworder" method="post">
            <s:hidden name="order.tyreType" value="${actionBean.tyre}" />   
            <fieldset>
                <s:errors/>
                <table>
                    <tr>
                        <th><s:label for="o1" name="order.tyresCount"/></th>
                        <td><s:text id="o1" name="order.tyresCount" formatType="number"/></td>
                    </tr>
                    <tr>
                        <th><s:label for="o2" name="order.vehicleBrand"/></th>
                        <td><s:text id="o2" name="order.vehicleBrand" /></td>
                    </tr>
                    <tr>
                        <th><s:label for="s1" name="key.services"/></th>
                        <td>
                            <table>
                                <c:forEach items="${actionBean.services}" var="service">
                                    <tr>
                                        <td>
                                            <s:checkbox name="checkedServices" value="${service.id}"/>
                                        </td>
                                        <td>
                                            <s:label name="${service.name}"/>
                                        </td>
                                        <td>
                                            <s:label name="${service.price}"/>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </td>
                    </tr>
                </table>
                        <s:submit name="neworder"> <f:message key="key.newOrder1" /> </s:submit>
                </fieldset>
        </s:form>

    </s:layout-component>
</s:layout-render>